table {
    background: var(--color-accent0);
    margin: 0.4rem;
    overflow-x: auto;
    max-width: calc(100% - 2 * 0.4rem);
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.4rem;
    position: relative;
}

table.outdated::before,
table.uninitialized::before {
    border-radius: 0.4rem;
    content: "";
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 10;
    opacity: 0.8;
}

table.outdated::after {
    content: "";
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    width: 1rem;
    height: 1rem;
    background: var(--color-text);
    z-index: 10;
    animation: 8s linear 0s infinite turn;
    mask-size: cover;
    mask-image: var(--loader-icon);
}

table.uninitialized > *,
table.outdated > * {
    filter: blur(2px);
}

table * {
    border: none
}

table td {
    text-align: center;
}

table thead th {
    padding: 0.2rem;
    background-color: var(--color-accent2);
}

table thead th:first-child {
    border-top-left-radius: 0.4rem;
}

table thead th:last-child {
    border-top-right-radius: 0.4rem;
}

table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0.4rem;
}

table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0.4rem;
}

table tbody tr {
    filter: sepia(0%);
    transition: filter .2s;
}

table tbody tr td {
    background: var(--color-accent1);
}

table tbody tr:nth-child(odd) td {
    background: var(--color-accent0);
}

table tbody tr:hover {
    filter: sepia(20%);
}

#refresh-btn {
    padding: 0.4rem;
    padding-right: calc(1rem + 0.4rem + 0.4rem);
    border: 2px solid var(--color-headline);
    transition: background .1s, color .1s, opacity .2s;
    --text-color: var(--color-headline);
    color: var(--text-color);
    background: transparent;
    border-radius: 0.4rem;
    opacity: 1;
    cursor: pointer;
}

#refresh-btn:disabled {
    opacity: 0.4;
}

#refresh-btn:hover {
    background: var(--color-headline);
    --text-color: var(--color-bg);
}

#refresh-btn::after {
    content: "";
    position: absolute;
    margin-left: 0.4rem;
    width: 1rem;
    height: 1rem;
    background: var(--text-color);
    mask-size: cover;
}

#refresh-btn:not(:disabled)::after {
    mask-image: var(--refresh-icon);
}

#refresh-btn:disabled::after {
    mask-image: var(--loader-icon);
    transform: rotate(0deg);
    animation: 8s linear 0s infinite turn;
}

@keyframes turn {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

span:has(#favs-only) * {
    cursor: pointer;
}

span:has(#favs-only) {
    float: right;
    user-select: none;
}

label.star {
    visibility: hidden;
    cursor: pointer;
    font-size: 100%;
    margin: 0;
}

label.star:before {
    content: "\2606";
    visibility: visible;
    user-select: none;
}

input.star:checked + label.star:before {
    content: "\2605";
}

input.star {
    display: none;
}

body:has(#favs-only:checked) table tbody tr:not(:has(.star:checked)) {
    display: none;
}